import React from 'react';

import { ColumnFieldBase } from '../../../typings/ColumnFieldBase';
import { bizUtil } from '../../../utils';

type TextColumnFieldProps = ColumnFieldBase & {};

const TextColumnField: React.FC<TextColumnFieldProps> = (props) => {
  const { value, pipes = [] } = props;
  const finalValue = bizUtil.executePipes(value, pipes);
  return <span style={{ wordBreak: 'break-all' }}>{finalValue}</span>
}

export {
  TextColumnField,
  TextColumnFieldProps
}
